import request from './http'

/**
 * login
 * 登录
 */
export const login = (data) => {
    return request({
        url: '/user/login',
        method: 'POST',
        data
    })
}
/**
 * register
 * 注册
 */
export const register = (data) => {
    return request({
        url: '/user/register',
        method: 'POST',
        data
    })
}
/**
 * logout
 * 注销
 */
export const logout = () => {
    return request({
        url: '/user/logout',
        method: 'POST',
    })
}
/**
 * newChat
 * 新建会话
 */
export const newChat = (data) => {
    return request({
        url: '/chat/new',
        method: 'POST',
    })
}
/**
 * sendChat
 * 发送消息
 */
export const sendChat = (data) => {
    return request({
        url: '/chat',
        method: 'POST',
        data
    })
}